package br.edu.ufcg.greengrid.event.reader;

import br.edu.ufcg.greengrid.event.Event;
import br.edu.ufcg.greengrid.event.MachineAvailabilityEvent;

public class MachineAvailabilityEventReader extends EventReader<MachineAvailabilityEvent> {

	@Override
	protected MachineAvailabilityEvent getEvent(String line) {
		String[] split = line.split(Event.SEPARATOR);
		int index = 0;
		MachineAvailabilityEvent event = new MachineAvailabilityEvent(split[index++], Long.parseLong(split[index++]),
				Long.parseLong(split[index++]));
		return event;
	}

}
